#include <iostream>
#include <cmath>
using namespace std;

double func(double x, double n)
{
	if(n == 1)
		return sqrt(1 + x);
	return sqrt(n + func(x, n - 1));
}

int main()
{
	double x, n;
	cin >> x >> n;
//	cout << func(x, n) << endl;
	printf("%.2lf\n", func(x, n));
	return 0;
}
